package top.littlejiang.onlinexam.service;

import org.springframework.web.multipart.MultipartFile;

import java.awt.image.BufferedImage;
import java.io.IOException;

/**
 * @author chen
 * @Description
 * @since 2021/2/28 12:08
 */
public interface OlexamFileService {

    /**
     * 根据图片名返回图片
     * @param imageName
     * @return
     * @throws IOException
     */
    BufferedImage getImage(String imageName) throws IOException;

    /**
     * 保存图片
     * @param file
     * @param urlPrefix
     * @return
     */
    String saveFile(MultipartFile file, String urlPrefix);
}
